package com.demohomework.homeworkdemo.pojo;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;
@Data
// 通知实体类
public class Notice {
    // 记录的唯一标识符
    @NotNull(groups = { Update.class})
    private int id;

    // 通知信息
    @NotEmpty(groups = { Add.class, Update.class})
    private String info;

    // 通知标题
    @NotEmpty(groups = { Add.class, Update.class})
    private String title;

    // 创建时间
    private LocalDateTime createAt;

    // 更新时间
    private LocalDateTime updateAt;

    public interface Add{

    }

    public  interface   Update{

    }
}

